# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-distributed
pkgver=2022.6.1
pkgrel=0
pkgdesc="A library for distributed computation"
url="https://distributed.dask.org/"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
depends="
	py3-click
	py3-cloudpickle
	py3-dask
	py3-jinja2
	py3-locket
	py3-msgpack
	py3-psutil
	py3-sortedcontainers
	py3-tblib
	py3-toolz
	py3-tornado
	py3-urllib3
	py3-yaml
	py3-zict
	"
makedepends="
	linux-headers
	py3-setuptools
	python3-dev
	yaml-dev
	"
checkdepends="
	py3-arrow
	py3-h5py
	py3-jsonschema
	py3-lz4
	py3-paramiko
	py3-pytest
	py3-pytest-asyncio
	py3-requests
	py3-scipy
	"
source="https://pypi.python.org/packages/source/d/distributed/distributed-$pkgver.tar.gz"
# Mosts tests are broken by new pytest-asyncio
# See https://github.com/dask/distributed/pull/4212 for an explanation
options="!check"
builddir="$srcdir/distributed-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD/build/lib" pytest \
		--ignore distributed/comm/tests/test_comms.py \
		--ignore distributed/tests/test_core.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
84e3c8136caccde71639f64405663a7a44632fbd76a63ff0372f192b4b23cbe3e21b3ab7fa87e17918eb6542b96c24c047dc8849f74f16c2da805cd8e3aeb233  distributed-2022.6.1.tar.gz
"
